﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

/*
 * AVISO:
 * ESSA CLASSE NAO ESTÁ TERMINADA! NÃO MECHA SEM A AUTORIZAÇÃO DO AUTOR!
*/


namespace Super_Pong.Classes
{
    public enum bouncerType
    {
        SHAPE,
        ANGLE,
        FIXEDANGLE
    }

    public class Bouncer : BarPiece
    {
        private float reAngle;
        private float reSpeed;
        private Shape.ShapeType shape;
        private bouncerType type;
        private Animation animation;
        private Vector2 position;

        #region Constructor
        /// <summary>
        /// Construtora da Bouncer
        /// </summary>
        /// <param name="price">Preço da peça</param>
        /// <param name="owner"></param>
        /// <param name="shape"></param>
        /// <param name="type"></param>
        /// <param name="ani"></param>
        /// <param name="pos"></param>
        
        public Bouncer(int price, Player owner, Shape.ShapeType shape, bouncerType type,Animation ani, Vector2 pos)
        {
            SetPrice(price);
            SetOwner(owner);
            this.shape = shape;
            this.type = type;
            this.animation = ani;
            this.position = pos;
        }
        #endregion

        //Construir essa função baseado na resposta de colisão
        //Essa função deve chamar o metodo collide da entidade?
        //Ou essa função colide a entidade automaticamente?
        public void Bounce(Entity ent)
        {
        }

        public override void collide(Entity e)
        {
            //nao faz nada
        }

        #region gets and sets
        public float GetreAngle()
        {
            return reAngle;
        }
        public float GetreSpeed()
        {
            return reSpeed;
        }
        public void SetreAngle(float f)
        {
            reAngle = f;
        }
        public void SetreSpeed(float s)
        {
            reSpeed = s;
        }

        #endregion

        #region Draw and Update
        public override void Update(GameTime elapsedTime)
        {
            throw new NotImplementedException();
        }

        public override void Draw(SpriteBatch sb)
        {
            sb.Draw(animation.GetCurrentImage(),position,Color.White);
        }
        #endregion

    }
}
